﻿@using ALinq.BBS.App_GlobalResources
@using ALinq.BBS.DataAccess
@{
    PageData["Title"] = Label.MyPermission;
    PageData["Css"] = "MyPermissions.css";
    Layout = "_Layout.cshtml";

    var roles = Roles.GetRolesForUser();
    var boards = new Boards();

    //TODO:Get Permissions
    var permissions = new List<dynamic>();
}
<script type="text/javascript">
    function selCatalog_onchange() {
    }
</script>
<div>
    <div class="pageTitle" style="float: left;">
        我的权限</div>
    <div style="float: right; color: #525552; font-size: 14px; padding-right: 10px; vertical-align: bottom;">
        你所在的用户组为“@string.Join("、", roles)”
    </div>
</div>
<div class="HackBox">
</div>
<table style="width: 100%;">
    <tr>
        <td colspan="2" class="permissionHeader" style="border-top: solid 1px #FFE3AD;">
            <span>在</span>
            <select id="selCatalog" style="width: 180px; background-color: #FFFBEF; margin: 0px 4px 0px 4px;"
                onchange="return selCatalog_onchange()">
                <option value="">请选择版块</option>
                @foreach (var board in boards)
                {
                    <option value="">@board.Name</option>
                }
            </select>
            <span>版块内，具有的以下权限：</span>
        </td>
    </tr>
    @foreach (var p in permissions)
    {
        <tr class="permissionItem">
            <td class="label" style="width: 140px;">
                @p.Name
            </td>
            <td class="remark">
                @p.Remark
            </td>
        </tr>
    }
</table>
